package com.micro.ai.auth.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 登录请求DTO
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@Schema(description = "登录请求")
public class LoginRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "租户ID（可选，默认使用第一个租户）", example = "1001", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String tenantId;

    @Schema(description = "用户名或邮箱（必填）", example = "admin", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "用户名不能为空")
    private String username;

    @Schema(description = "密码（必填）", example = "admin123", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "密码不能为空")
    private String password;

    @Schema(description = "验证码（可选）", example = "ABCD")
    private String captcha;

    @Schema(description = "验证码KEY（可选）", example = "captcha_123456")
    private String captchaKey;

    @Schema(description = "双因素认证码（可选）", example = "123456")
    private String twoFactorCode;

    @Schema(description = "记住我（可选，默认false）", example = "true")
    private Boolean rememberMe;

    @Schema(description = "设备ID（可选）", example = "device_12345")
    private String deviceId;

    @Schema(description = "设备名称（可选）", example = "iPhone 13")
    private String deviceName;
}

